package com.ds.robot.assistant.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * 员工表
 *
 * @author WeiShaoying
 */
@Getter
@Setter
@TableName("emp_info")
public class EmpInfoEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId
    private Integer id;
    /**
     * 账号ID
     */
    private String accountId;
    /**
     * 姓名
     */
    private String name;
    /**
     * 角色ID
     */
    private String roleId;
    /**
     * 角色名称
     */
    private String roleName;
    /**
     * 状态
     */
    private String state;
    /**
     * 创建时间
     */
    private Date createdAt;
    /**
     * 修改时间
     */
    private Date updatedAt;


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        EmpInfoEntity that = (EmpInfoEntity) o;
        return accountId.equals(that.accountId) &&
                name.equals(that.name) &&
                roleId.equals(that.roleId) &&
                roleName.equals(that.roleName) &&
                state.equals(that.state);
    }

    @Override
    public int hashCode() {
        return Objects.hash(accountId, name, roleId, roleName, state);
    }

}
